import {messages} from "share/common";
import React, { Component } from 'react';
import {Button, Divider, Row, Col} from 'antd'
import 'styles/supplier-management/new-consumer-management/edit-frams/edit-frame.scss'

class DefaultRule extends Component{

  constructor(props){
    super(props);
    this.supplier = [messages('supplier-1.key80')/*机票*/,messages('supplier-1.key82')/*火车*/,messages('supplier-1.key81')/*酒店*/];
    this.state = {
    };
  }

  onCancelEdit = () => {
    this.props.close();
  };

  createRule = () => {
    return this.supplier.map(item => {
      return (
        <Row>
          <Col span={2}/>
          <Col span={6}>
            {item}{messages('supplier-1.key227')/*行程\"其他\"供应商*/}
          </Col>
          <Col span={16}>
            <p>{messages('supplier-1.key228')/*不启用*/}</p>
            <p style={{color: '#a3b3d5'}}>{messages('supplier-1.key229')/*启用后，可在申请单上选择\"其他\"供应商*/}</p>
          </Col>
        </Row>
      )
    })
  }

  render() {
    return (
      <div className='edit-frame'>
        <h3 className='slide-title' style={{borderBottom: 0}}>{messages('supplier-1.key230')/*差旅申请单启用【其他供应商】行程类型*/}</h3>
        {this.createRule()}
        <br/><br/><br/><br/>
        <div className='affix-bottom'>
          <Button onClick={this.onCancelEdit}>
            {messages('supplier-1.key231')/*关闭*/}
          </Button>
        </div>
      </div>
    )
  }
}

export default DefaultRule;


